Data usage keeps rising in cellular networks due to the increasing popularity of smartphones and other personal or mobile communication devices. Operators are now experiencing cellular network congestion because of the high level of data usage. To alleviate the network congestion problem, operators are interested in offloading cellular data to WiFi networks as smartphones are being equipped with WiFi connecting capability, WiFi systems use license-free spectrum, and are widely deployed at relatively low cost. However, current WiFi approaches for offloading data try to solve the offloading problem at the Internet protocol (IP) layer or above. With these approaches, the entire data traffic under consideration is either offloaded to a WiFi network or kept on the cellular network. Some approaches only offload traffic for a specific destination IP address, while other traffic stays on the cellular network. These various approaches may have limited performance (e.g., in term of efficiently using the resource of the WiFi networks) depending on the amount and type of traffic. There is a need for an improved approach that takes advantage of aspects of both the WiFi and cellular networks.